load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "buildifier2_lib",
    srcs = ["buildifier2.go"],
    importpath = "github.com/bazelbuild/buildtools/buildifier2",
    visibility = ["//visibility:private"],
    deps = [
        "//build",
        "//convertast",
        "@net_starlark_go//syntax",
    ],
)

go_binary(
    name = "buildifier2",
    embed = [":buildifier2_lib"],
    visibility = ["//visibility:public"],
)
